﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace DFGK_WMS.Context.Migrations
{
    public partial class 报销单表对账申请表供应商对账明细表 : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateTable(
                name: "T_ExpenseClaim",
                columns: table => new
                {
                    Id = table.Column<long>(type: "bigint", nullable: false),
                    ApplicantId = table.Column<int>(type: "int", nullable: false),
                    ExpenseAmount = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
                    ExpenseCategory = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: true),
                    Status = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: true),
                    ApprovalTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    CreateUserId = table.Column<long>(type: "bigint", nullable: false),
                    CreateUserName = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true),
                    CreateDate = table.Column<DateTime>(type: "datetime2", nullable: false),
                    ModifyUserId = table.Column<long>(type: "bigint", nullable: false),
                    ModifyUserName = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true),
                    ModifyDate = table.Column<DateTime>(type: "datetime2", nullable: false),
                    IsDel = table.Column<bool>(type: "bit", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_T_ExpenseClaim", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "T_SupplierReconciliation",
                columns: table => new
                {
                    Id = table.Column<long>(type: "bigint", nullable: false),
                    SupplierName = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: true),
                    ReconciliationDate = table.Column<DateTime>(type: "datetime2", nullable: false),
                    Amount = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
                    ReconciliationDetails = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: true),
                    SupplierContact = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: true),
                    SupplierPhone = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: true),
                    SupplierAddress = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: true),
                    ReconciliationStatus = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: true),
                    CreateUserId = table.Column<long>(type: "bigint", nullable: false),
                    CreateUserName = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true),
                    CreateDate = table.Column<DateTime>(type: "datetime2", nullable: false),
                    ModifyUserId = table.Column<long>(type: "bigint", nullable: false),
                    ModifyUserName = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true),
                    ModifyDate = table.Column<DateTime>(type: "datetime2", nullable: false),
                    IsDel = table.Column<bool>(type: "bit", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_T_SupplierReconciliation", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "T_VendorReconciliationRequest",
                columns: table => new
                {
                    Id = table.Column<long>(type: "bigint", nullable: false),
                    VendorId = table.Column<int>(type: "int", nullable: false),
                    RequestTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    RequestStatus = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: true),
                    ApprovedBy = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: true),
                    ApprovalTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    CreateUserId = table.Column<long>(type: "bigint", nullable: false),
                    CreateUserName = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true),
                    CreateDate = table.Column<DateTime>(type: "datetime2", nullable: false),
                    ModifyUserId = table.Column<long>(type: "bigint", nullable: false),
                    ModifyUserName = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true),
                    ModifyDate = table.Column<DateTime>(type: "datetime2", nullable: false),
                    IsDel = table.Column<bool>(type: "bit", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_T_VendorReconciliationRequest", x => x.Id);
                });
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "T_ExpenseClaim");

            migrationBuilder.DropTable(
                name: "T_SupplierReconciliation");

            migrationBuilder.DropTable(
                name: "T_VendorReconciliationRequest");
        }
    }
}
